package com.dataextend.dto;

import lombok.Data;

import java.util.List;

@Data
public class ActMissionDTO {
    /** 任务id */
    private String missionId;

    /** 活动名称 */
    private String missionName;

    /** 简介 */
    private String introduction;
    private actJudgeInfo actJudge;
    private propertyJudgeInfo propertyJudge;
    private blacklistFilterInfo blacklistFilter;
    private waitFilterInfo waitFilter;
    private putChannelInfo putChannel;
    private Integer status;
    private List<sequenceInfo> sequenceInfos;


    @Data
    public static class sequenceInfo{
        private String from;
        private String to;
    }

    // 行为判断
    @Data
    public static class actJudgeInfo{
        private String nodeId;      // 节点id
        private String nodeName;    // 节点名称
        private String startDate;   // 进入日期起始
        private String endDate;     // 进入日期结束
        private String actInfo;     // 触发行为
        private String type;
        private String left;
        private String top;
    }


    // 属性判断
    @Data
    public static class propertyJudgeInfo{
        private String nodeId;
        private String nodeName;
        private propertyRules propertyRules;
        private String type;
        private String left;
        private String top;
    }


    @Data
    public static class propertyRules {
        private String relationship;
        private List<ruleDetails> ruleDetails;
    }

    @Data
    public static class ruleDetails{
        private String key;        // 标签code
        private String value;      // 标签值
        private String condition;  // 条件 = != >=  <= like
    }


    // 黑名单过滤
    @Data
    public static class blacklistFilterInfo {
        private String nodeId;
        private String nodeName;
        private String groupId;   // 人群id
        private String groupName; // 人群名称
        private String type;
        private String left;
        private String top;
    }


    // 等待
    @Data
    public static class waitFilterInfo {
        private String nodeId;
        private String nodeName;
        private String minutes;   // 等待分钟
        private String type;
        private String left;
        private String top;
    }


    // 投放渠道
    @Data
    public static class putChannelInfo{
        private String nodeId;
        private String nodeName;
        private String channel;        // 渠道
        private String messageTitle;   // 消息标题
        private String messageInfo;    // 消息内容
        private String type;
        private String left;
        private String top;
    }
}
